package gov.pbc.nn.kjgl.fxq.organInfor.entity;

import java.io.Serializable;
import javax.persistence.*;

import java.util.Collection;
import java.util.Date;
import com.bstek.dorado.annotation.PropertyDef;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import gov.pbc.nn.core.entity.BaseEntity;
import gov.pbc.nn.kjgl.fxq.organInfor.entity.OrganPersonInfor;

/**
 * t_fxq_organ_infor:
 */
@Entity
@Table(name = "t_fxq_organ_infor")
public class OrganInfor extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@Column(name = "ORGAN_NAME_")
	@PropertyDef(label = "义务机构名称", description = "ORGAN_NAME_:")
	private String organName;

	@Column(name = "ORGAN_NUM_", length = 255)
	@PropertyDef(label = "义务机构编码", description = "ORGAN_NUM_:")
	private String organNum;

	@Column(name = "INDUSTRY_TYPE_")
	@PropertyDef(label = "行业类别", description = "10：银行业机构，11：银行业法人机构，20：证券期货业机构，21：证券期货业法人机构，30：保险业机构，31：保险业法人机构吗，40：支付机构，41：支付机构法人机构")
	private int industryType;

	@Column(name = "IS_LEGAL_PERSON_")
	@PropertyDef(label = "是否法人", description = "IS_LEGAL_PERSON_:")
	private int isLegalPerson;

	@Column(name = "IS_FOREIGN_CAPITAL_")
	@PropertyDef(label = "是否外资", description = "IS_FOREIGN_CAPITAL_:")
	private int isForeignCapital;

	@Temporal(TemporalType.DATE)
	@Column(name = "SET_UP_TIME_")
	@PropertyDef(label = "设立时间", description = "SET_UP_TIME_:")
	private Date setUpTime;

	@Column(name = "DEPARTMENT_", length = 255)
	@PropertyDef(label = "职能部门", description = "DEPARTMENT_:")
	private String department;

	@Column(name = "FAX_", length = 255)
	@PropertyDef(label = "传真", description = "FAX_:")
	private String fax;

	@Column(name = "ADDRESS_", length = 255)
	@PropertyDef(label = "通讯地址", description = "ADDRESS_:")
	private String address;

	@Column(name = "ZIP_CODE_", length = 255)
	@PropertyDef(label = "邮编", description = "ZIP_CODE_:")
	private String zipCode;

	@Column(name = "ORGAN_STATE_")
	@PropertyDef(label = "机构状态", description = "ORGAN_STATE_:")
	private int organState;

	@Column(name = "STATE_")
	@PropertyDef(label = "状态", description = "STATE_:")
	private int state;
	
	@Column(name = "DEPT_ID_", length = 60)
	private String deptId;
	
	@Column(name = "DEPT_NAME_", length = 200)
	@PropertyDef(label = "所属部门")
	private String deptName;
	
	@Column(name = "SUBMIT_DATE", length = 200)
	@PropertyDef(label = "提交时间")
	private Date submitDate;
	
	@OneToMany(cascade = CascadeType.ALL,fetch = FetchType.LAZY)
	@JoinColumn(name = "ORGANINFOR_ID_")
	private Collection<OrganPersonInfor> organPersonInfors;
	
	

	public void setOrganName(String organName) {
		this.organName = organName;
	}

	public String getOrganName() {
		return organName;
	}

	public void setOrganNum(String organNum) {
		this.organNum = organNum;
	}

	public String getOrganNum() {
		return organNum;
	}

	public void setIndustryType(int industryType) {
		this.industryType = industryType;
	}

	public int getIndustryType() {
		return industryType;
	}

	public void setIsLegalPerson(int isLegalPerson) {
		this.isLegalPerson = isLegalPerson;
	}

	public int getIsLegalPerson() {
		return isLegalPerson;
	}

	public void setIsForeignCapital(int isForeignCapital) {
		this.isForeignCapital = isForeignCapital;
	}

	public int getIsForeignCapital() {
		return isForeignCapital;
	}

	public void setSetUpTime(Date setUpTime) {
		this.setUpTime = setUpTime;
	}

	public Date getSetUpTime() {
		return setUpTime;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public String getDepartment() {
		return department;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public String getFax() {
		return fax;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAddress() {
		return address;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setOrganState(int organState) {
		this.organState = organState;
	}

	public int getOrganState() {
		return organState;
	}

	public void setState(int state) {
		this.state = state;
	}

	public int getState() {
		return state;
	}
	
	public void setOrganPersonInfors(Collection<OrganPersonInfor> organPersonInfors) {
		this.organPersonInfors = organPersonInfors;
	}

	public Collection<OrganPersonInfor> getOrganPersonInfors() {
		return organPersonInfors;
	}
	
	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}

	public String getDeptId() {
		return deptId;
	}
	
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getDeptName() {
		return deptName;
	}
	
	public void setSubmitDate(Date submitDate) {
		this.submitDate = submitDate;
	}

	public Date getSubmitDate() {
		return submitDate;
	}
}
